The present disclosure relates to an image processing apparatus, an image processing method, and a program, and particularly relates to an image processing apparatus, an image processing method, and a program which are designed to make it possible to locally obtain a painterly effect in an image in one process.
In related art, there is well known LPF (Low-pass filter) processing performed for eliminating noise in image data. However, diversified needs in recent years lead to development of a special LPF by which an edge is retained for enhancing contrast, as represented by a bilateral filter, and further to development of a painterly filter and the like to which the LPF is applied.
The painterly filter is a technique of converting an inputted image into a painterly image as an outputted image. Such a technique is referred to as Non Photorealistic Rendering (NPR). As the NPR technique, the following techniques are known by which images having textures like a watercolor and an oil painting are obtained. To obtain a texture like a watercolor, smoothing is performed while retaining edges by using the bilateral filter or a kuwahara filter. To obtain a texture like an oil painting, an image is provided with a pattern similar to paintbrush strokes.
For example, JP H8-44867A (U.S. Pat. No. 5,621,868A) describes algorithm by which an outputted image like an oil painting is obtained by generating a pattern similar to paintbrush strokes by repeating a process of replacing values of pixels surrounding the center pixel in a certain oval region in an inputted image with a value of the center pixel. Note that this technique uses monotonous textures of generated strokes, and thus achieves only, a small number of painting styles.
In contrast, A. Hertzmann, “Painterly Rendering with Curved Brush Strokes of Multiple Sizes,” Proc. Sgigraph 98, ACM Press, 1998, pp. 453-460 (Non-patent Document 1) proposes algorithm by which a squared error between an inputted image and an outputted image is made smaller and smaller by repeating drawing a brush pattern on an outputted image, so that an outputted image like an oil painting is obtained. This technique can change the painting style of the outputted image by changing the shape of a brush for the drawing. For example, use of a circular brush makes it possible to obtain an outputted image like a pointillistic image, and use of a free trajectory brush pattern (Curved Brush Stroke) makes it possible to obtain an outputted image like an impressionistic image.
Meanwhile, brush-touch control techniques are proposed as in JP 2011-160306A and JP 2011-166217A (US 2011/0187732A1). In JP 2011-160306A, the brush size is changed depending on a distance between a subject of an image and a photographer. In JP 2011-166217A (US 2011/0187732A1), the brush size is changed depending on the area of a main subject.